'use strict';
async function test(event, context){
  //event为客户端上传的参数
	const db = uniCloud.database();
	//服务端当前时间加1S
	let time = new Date().toISOString()
	
	const collection = db.collection('user');
	let res = await collection.add(event)
	 //返回数据给客户端
  return {
		res:res,
		date: time
	}
	
};

var main = test;

// var signIn = {
// 	main: main
// };

// exports.default = signIn;
exports.main = main;
